Function isotope::parser::lifetime[][src]

pub fn lifetime(input: &str) -> IResult<&str, Option<Constraints>>
Expand description

Parse a lifetime

Examples

use isotope::{parser::*, ast::*};
const NO_CNSTR: Constraints = Constraints(vec![]);
assert_eq!(lifetime("#lifetime").unwrap(), ("", None));
assert_eq!(lifetime("#lifetime{}").unwrap(), ("", Some(NO_CNSTR)));